import request from '@/router/axios';


export const recharge = (row) => {
  return request({
    url: '/api/ocm-pay/shoppayinfo/s/recharge',
    method: 'post',
    data: row
  })
}

export const withdraw = (row) => {
  return request({
    url: '/api/ocm-pay/shoppayinfo/s/withdraw',
    method: 'post',
    data: row
  })
}

export const getWallet = () => {
  return request({
    url: '/api/ocm-pay/shoppayinfo/s/wallet',
    method: 'get'
  })
}

export const getCertification = () => {
  return request({
    url: '/api/ocm-pay/shoppayinfo/s/certification',
    method: 'get'
  })
}
export const getCardType = (cardNo,cardBinCheck) => {
  return request({
    url: 'https://ccdcapi.alipay.com/validateAndCacheCardInfo.json?_input_charset=utf-8',
    method: 'get',
    params: {
      cardNo,cardBinCheck
    }
  })
}
export const addBankCard = (row) => {
  return request({
    url: '/api/ocm-pay/bankcard/u/bankcard',
    method: 'post',
    data: row
  })
}
export const bankCardList = () => {
  return request({
    url: '/api/ocm-pay/bankcard/u/bankcard',
    method: 'get'
  })
}
export const getDetail = (id) => {
  return request({
    url: '/api/ocm-shop/shop/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (ids) => {
  return request({
    url: '/api/ocm-shop/shop/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/ocm-shop/shop/submit',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/ocm-shop/shop/submit',
    method: 'post',
    data: row
  })
}
export const getOne = () => {
  return request({
    url: '/api/ocm-shop/shop/getOne',
    method: 'get'
  })
}

export const updateByUser = (row) => {
  return request({
    url: '/api/ocm-shop/shop/update',
    method: 'post',
    data: row
  })
}

